<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateQdUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qd_users', function (Blueprint $table) {
            $table->id();
            $table->string("openid")->comment("微信端唯一识别码");
            $table->string("name")->comment("用户名");
            $table->string("phone")->comment("手机号");
            $table->boolean("is_self")->nullable()->default(false);
        });
        DB::statement("ALTER TABLE `qd_users` comment'签到记录的用户表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qd_users');
    }
}
